class ConferenceController < ApplicationController
  layout "layouts/standard_layout"
  def index
    unless params[:id]
      redirect_to :action=>"list_conferences"
      return
    end
    @conf = Conference.find(params[:id])
    @page_title = "#{@conf.name} Home"
  end
  
  def events
    unless params[:id]
      redirect_to :action=>"list_events"
      return
    end    
    @event = Event.find(params[:id])
    @page_title = "#{@event.name} Home"
  end
  
  def list_conferences
    @confs = Conference.find(:all)
    @page_title = "All Conferences"
  end
  
  def list_events
    @events = Event.find(:all, :order=>"conference_id")
    @page_title = "All Events"
  end
end
